package helpers;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class Client {

	private int m_ID ; 
	private String m_type;
	private String m_ip;
	private int m_port;
	private int m_zona;
	
	
	
	public Client(int ID ,String tip, String ip, int port,int zona)
	{
		m_ID = ID;
		m_type = tip;
		m_ip = ip;
		m_port = port;
		m_zona = zona;
		
	}
	
	public int getId()
	{
		return m_ID;
	}
	
	public String getType()
	{
		return m_type;
	}
	
	public String getIp()
	{
		return m_ip;
	}
	
	public int getPort()
	{
		return m_port;
	}
	
	public int getZona()
	{
		return m_zona;
	}
	public Client(DataInputStream dis) throws IOException
	{
		m_ID = dis.readInt();
		m_type = dis.readUTF();
		m_ip = dis.readUTF();
		m_port = dis.readInt();
		m_zona = dis.readInt();
		
	}
	
	public void write(DataOutputStream dos) throws IOException
	{
		dos.writeInt(m_ID);
	}
}
